package annotation;

import org.omg.DynamicAny.DynAnyFactoryPackage.InconsistentTypeCodeHelper;

import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
 * @ClassName UserCaseTracker
 * @Description
 * @Author LIBOFEI
 * @Date 2020/6/7 16:07
 * @Version 1.0
 **/
public class UserCaseTracker {

    public static void trackUserCase(List<Integer> userCases,Class<?> c1){
        for(Method m : c1.getDeclaredMethods()){
            UserCase u = m.getAnnotation(UserCase.class);
            if(u != null){
                System.out.println("id:" + u.id() + ",decription:" +u.desription());
                userCases.remove(new Integer(u.id()));
            }
        }
        for(int i : userCases){
            System.out.println("mission id" + i);
        }

    }

    public static void main(String[] args) {
        List<Integer> list = new ArrayList<>();
        Collections.addAll(list,46,47,48);
        trackUserCase(list,PasswordUtils.class);
    }
}
